/**
 * GExporter 1.0 - Exports your gmail address book with great flexibility.
 * Copyright (C) 2005 Karthik V (karthiksden@gmail.com)
 * This software is distributed under GNU GPL ( http://www.gnu.org/copyleft/gpl.html )
 */

package vkarthik.gtools.gexport;

import javax.swing.JDialog;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.JPanel;
import javax.swing.BorderFactory;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JLabel;
import javax.swing.JProgressBar;
import javax.swing.JFrame;
import java.awt.*;

public class GExProgressView extends JDialog {
static GExProgressView theGExProgressView;

JPanel pnPanel0;

JPanel pnPanel2;
JLabel lProgress;
JProgressBar progress;


/**
 */
public GExProgressView(JFrame fr) {

    super(fr);
    pnPanel0 = new JPanel();
    GridBagLayout gbPanel0 = new GridBagLayout();
    GridBagConstraints gbcPanel0 = new GridBagConstraints();
    pnPanel0.setLayout(gbPanel0);

    pnPanel2 = new JPanel();
    GridBagLayout gbPanel2 = new GridBagLayout();
    GridBagConstraints gbcPanel2 = new GridBagConstraints();
    pnPanel2.setLayout(gbPanel2);

    lProgress = new JLabel("Starting Export");
    gbcPanel2.gridx = 0;
    gbcPanel2.gridy = 0;
    gbcPanel2.gridwidth = 15;
    gbcPanel2.gridheight = 1;
    gbcPanel2.fill = GridBagConstraints.BOTH;
    gbcPanel2.weightx = 1;
    gbcPanel2.weighty = 1;
    gbcPanel2.anchor = GridBagConstraints.NORTH;
    gbcPanel2.insets = new Insets(0,0,10,0);
    gbPanel2.setConstraints(lProgress, gbcPanel2);
    pnPanel2.add(lProgress);

    progress = new JProgressBar();
    gbcPanel2.gridx = 0;
    gbcPanel2.gridy = 1;
    gbcPanel2.gridwidth = 15;
    gbcPanel2.gridheight = 1;
    gbcPanel2.fill = GridBagConstraints.BOTH;
    gbcPanel2.weightx = 1;
    gbcPanel2.weighty = 0;
    gbcPanel2.anchor = GridBagConstraints.NORTH;
    gbPanel2.setConstraints(progress, gbcPanel2);
    pnPanel2.add(progress);
    gbcPanel0.gridx = 11;
    gbcPanel0.gridy = 4;
    gbcPanel0.gridwidth = 17;
    gbcPanel0.gridheight = 5;
    gbcPanel0.fill = GridBagConstraints.BOTH;
    gbcPanel0.weightx = 1;
    gbcPanel0.weighty = 0;
    gbcPanel0.anchor = GridBagConstraints.NORTH;
    gbcPanel0.insets = new Insets(20,20,20,20);
    gbPanel0.setConstraints(pnPanel2, gbcPanel0);
    pnPanel0.add(pnPanel2);

    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    setContentPane(pnPanel0);
    pack();
	Toolkit toolkit = Toolkit.getDefaultToolkit();
	Dimension dim   = toolkit.getScreenSize();
	int width = 0, height = 0;
	setLocation((int)((dim.getWidth() - getWidth()) / 2), (int)((dim.getHeight() - getHeight()) / 2));
    show();
}
}
